package com.quanyan.club.pullclub.service;

import com.quanyan.api.APIResponse;
import com.quanyan.club.entity.db.TbChannelStream;
import com.quanyan.club.entity.db.TbChannelUser;
import com.quanyan.club.entity.db.TbClub;
import com.quanyan.club.entity.vo.resp.RespClubActivity;
import com.quanyan.club.pullclub.entity.req.ChannelSellDo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by yue.yuan on 2017/2/13.
 */
public interface PullClubSupportService {

    boolean updatePullStatus(TbChannelUser tbChannelUser, byte targetStatus);

    TbChannelUser isPullUser(int uid, TbClub tbClub, Integer activityId,
                             Byte targetStatus, Date activityCreateTime);

    int getPointEggs(int signCount, int clubType);

    boolean pullUserSuccess(TbChannelUser tbChannelUser, RespClubActivity respClubActivity,
                            TbClub club, List<Integer> signUsers);

    ChannelSellDo getChannelSellModel(int roleId, int roleType);

    Integer getRoleIdByCode(int roleType, String code, String exCode);

    TbChannelStream insertChannelStream(Integer withdrawNo, String serialNo, int uid,
                                        BigDecimal money, int clubId, ChannelSellDo model,
                                        byte type, byte status, String reason);

    Double getSignFee();

    APIResponse getEgg(Map<Integer, Long> uidEggMap);

    int getSignCountsSetting(String column);

    String getEncryptCode(int type, String code);

    /**
     * 获取配置信息
     * @param id
     * @return
     */
    Map<String,Object> getPointBy(int id);

    /**
     * 解密获取明文type和code
     * @param code
     * @return
     */
    Map<String,String> getDecryptCode(String code);
}
